package com.hspedu.homework;

/**
 * @author DL5O
 * @version 1.0
 */
public class Homework05 {

    public static void main(String[] args) {
        A a = new A();
        a.hi();

        System.out.println(a);
    }
}


class A{
    private String name = "大龙";
    public void hi(){
        class B{
            private final String name = "小龙";
            public void show(){
                System.out.println("外部类的name=" + A.this.name);
                System.out.println("局部内部类的name="+this.name);
            }
        }

        B b = new B();
        b.show();

    }

    @Override
    public String toString() {
        return "A{" +
                "name='" + name + '\'' +
                '}';
    }
}